home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ARMLINUX / MAIL / 9708 / 000078_owner-linux-arm…r.rutgers.edu _Sun Aug 24 23:24:06 1997.msg < prev    next >
Internet Message Format  |  1997-11-30  |  5KB

  1. Return-Path: <owner-linux-arm-outgoing@vger.rutgers.edu>
  2. Received: from nic.funet.fi ([128.214.248.6] (may be forged))
  3.     by odie.barnet.ac.uk (8.8.6/8.8.6) with ESMTP id XAA10651
  4.     for <willy@odie.fluff.org>; Sun, 24 Aug 1997 23:24:04 +0100
  5. Received: from vger.rutgers.edu ([128.6.190.2] EHLO vger.rutgers.edu ident: root [port 21301]) by nic.funet.fi with ESMTP id <2946-10852>; Mon, 25 Aug 1997 00:51:26 +0300
  6. Received: by vger.rutgers.edu id <971948-9410>; Sun, 24 Aug 1997 17:47:49 -0400
  7. Received: from sun3.nsfnet-relay.ac.uk ([128.86.8.50] EHLO sun3.nsfnet-relay.ac.uk ident: IDENT-NOT-QUERIED [port 2697]) by vger.rutgers.edu with ESMTP id <971964-9410>; Sun, 24 Aug 1997 17:47:19 -0400
  8. Received: from bright.ecs.soton.ac.uk by sun3.nsfnet-relay.ac.uk with JANET SMTP (PP); Sun, 24 Aug 1997 22:49:59 +0100
  9. Received: from caramon.armlinux.org (annex4) by bright.ecs.soton.ac.uk; Sun, 24 Aug 97 22:52:08 BST
  10. Received: from raistlin.armlinux.org (raistlin [192.168.0.3]) by caramon.armlinux.org (8.7.4/8.7.3) with ESMTP id QAA05849 for <linux-arm@vger.rutgers.edu>; Sun, 24 Aug 1997 16:08:28 +0100
  11. From: Russell King <rmk@ecs.soton.ac.uk>
  12. Received: (from rmk@localhost) by raistlin.armlinux.org (8.7.4/8.7.3) id QAA01340 for linux-arm@vger.rutgers.edu; Sun, 24 Aug 1997 16:08:13 +0100
  13. Message-Id: <199708241508.QAA01340@raistlin.armlinux.org>
  14. Subject: Incompatable Linux 2.0.30 changes!
  15. To: linux-arm@vger.rutgers.edu
  16. Date:     Sun, 24 Aug 1997 16:08:12 +0100 (BST)
  17. X-Location: london.england.earth.mulky-way.universe
  18. Reply-To: rmk@ecs.soton.ac.uk
  19. X-Mailer: ELM [version 2.4 PL24]
  20. Mime-Version: 1.0
  21. Content-Type: text/plain; charset=US-ASCII
  22. Content-Transfer-Encoding: 7bit
  23. X-Orcpt: rfc822;linux-arm@vger.rutgers.edu
  24. Sender: owner-linux-arm@vger.rutgers.edu
  25. Precedence: bulk
  26. Status: RO
  27.  
  28. Hiya.
  29.  
  30. I've got a mail here from someone trying to use Linux on an 8MB machine.
  31. It seems to stall when mke2fsing a 1GB partition.
  32.  
  33. The machine has 64MB swap file on it, and the kernel message is:
  34. Adding Swap: 63316k (priority 27200).
  35.  
  36. I presume that at this priority, it wouldn't get used?  The next message
  37. is 'Could not get a free page....'
  38.  
  39. During my investigation, I came across the following problem:
  40.  
  41. It appears that the swapon call arguments have been modified with little
  42. protection on the values that passed in the new arguments.
  43.  
  44. Someone's extremely basic test, that should not have been put in even IMO as
  45. it stood does very little to guard against this, especially as the syscall
  46. number hasn't changed!
  47.  
  48. This means that if anyone uses an old version of the swapon binary for example,
  49. and the fact that swapon is still prototyped as swapon (const char *) in the
  50. header files, it's very likely that this change is going to cause me a lot of
  51. grief and probably many other people as well using different ports.
  52.  
  53. His test is basically:
  54.         if (swap_flags & SWAP_FLAG_PREFER) {
  55.                 p->prio =
  56.                   (swap_flags & SWAP_FLAG_PRIO_MASK)>>SWAP_FLAG_PRIO_SHIFT;
  57.         } ...
  58.  
  59. A 1 bit test!  An absolute turkey!  This means that I'm going to have to
  60. modify the RedHat installer yet again.  There is a good example of how do
  61. do this change in the kernel - the mount syscall:
  62.  
  63.  * NOTE! As old versions of mount() didn't use this setup, the flags
  64.  * has to have a special 16-bit magic number in the hight word:
  65.  * 0xC0ED. If this magic word isn't present, the flags and data info
  66.  * isn't used, as the syscall assumes we are talking to an older
  67.  * version that didn't understand them.
  68.  
  69. A better solution would have been to pass the second argument to swapon
  70. as a magic number, and the third as the priority, or even change the syscall
  71. number and have a backward-compatability function in the architecture
  72. specific code!
  73.  
  74. Obviously this isn't up for debate at this time, so I'm going to have to
  75. change the binaries, and the people who have downloaded ARM Linux (around
  76. 50GB or so of downloads so far) to redownload a few MB each (which would
  77. equal a total of 126 manhours of downloading time)!
  78.  
  79. I'd like Linus to know about this particular bit of grief so that he can
  80. check for this sort of thing, to help prevent it from happening again!  I'm
  81. not moaning - I'd just like to make sure that something like this doesn't
  82. lay dormant for several months before it becomes apparant!  (Sound's just
  83. like a virus doesn't it)!
  84.  
  85. This has come about because the RedHat 4.0 installer uses swapon (device)
  86. and not swapon (device, priority).  This means that the priority argument
  87. to the newly changed swapon routine can be anything. (RH4.0 uses Linux 2.0
  88. isn't it?).
  89.  
  90. I'll let people know once the new code is up on the FTP site.
  91.    _____
  92.   |_____| ------------------------------------------------- ---+---+-
  93.   |   |       Russell King        rmk@ecs.soton.ac.uk         --- ---
  94.   | | | | http://whirligig.ecs.soton.ac.uk/~rmk92/home.html  /  /  |
  95.   | +-+-+                                                     --- -+-
  96.   /   |               THE developer of ARM Linux              |+| /|\
  97.  /  | | |                                                     ---  |
  98.     +-+-+ -------------------------------------------------  /\\\  |